From: Keir Fraser Date: Mon, 5 May 2008 09:16:58 +0000 (+0100) Subject: Fix the address calculation of acpi enable reg according to ACPI spec. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~72 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=b3327776aef45f26829933d26870f22ed8c27e36;p=xen.git Fix the address calculation of acpi enable reg according to ACPI spec. Signed-off-by: Wei Gang --- diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 6ff77d3566..1cc148b2e3 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -475,8 +475,12 @@ acpi_fadt_parse_reg(struct acpi_table_fadt *fadt) sizeof(acpi_gbl_xpm1a_enable)); memcpy(&acpi_gbl_xpm1b_enable, &fadt->xpm1b_event_block, sizeof(acpi_gbl_xpm1b_enable)); - acpi_gbl_xpm1a_enable.address += 2; - acpi_gbl_xpm1b_enable.address += 2; + + acpi_gbl_xpm1a_enable.address += + acpi_gbl_FADT.pm1_event_length / 2; + if ( acpi_gbl_xpm1b_enable.address ) + acpi_gbl_xpm1b_enable.address += + acpi_gbl_FADT.pm1_event_length / 2; } }